﻿namespace BEGDC.PreContract.DAL
{
    using System;
    using System.Collections.Generic;
    using Castle.ActiveRecord;
    using NHibernate.Expression;

    [ActiveRecord]
    public partial class ProblemLVAssignment : ActiveRecordBase<ProblemLVAssignment>
    {
        #region Const Definition

        public const string CONST_ID = "ID";
        public const string CONST_ProblemLV1ID = "ProblemLV1ID";
        public const string CONST_ProblemLV2ID = "ProblemLV2ID";

        #endregion

        #region Member Variables

        // Primary Key
        private System.Int32 _ID;

        // Parents
        private DicItem _problemLV1;
        private DicItem _problemLV2;

        #endregion

        public ProblemLVAssignment()
        {

        }

        #region Properties

        // Primary Key        
#if (SQLServer)
        [PrimaryKey]
#else
[PrimaryKey(PrimaryKeyType.Native, SequenceName = "CONST_ID")]
#endif

        public System.Int32 ID
        {
            get { return this._ID; }
            set { this._ID = value; }
        }

        // Parent Relationships
        [BelongsTo("ProblemLV1ID")]
        public DicItem ProblemLV1ID
        {
            get { return this._problemLV1; }
            set { this._problemLV1 = value; }
        }

        // Parent Relationships
        [BelongsTo("ProblemLV2ID")]
        public DicItem ProblemLV2ID
        {
            get { return this._problemLV2; }
            set { this._problemLV2 = value; }
        }
        #endregion

        // Clone
        public ProblemLVAssignment Clone()
        {
            ProblemLVAssignment problemLVAssignment = new ProblemLVAssignment();
            problemLVAssignment.ProblemLV1ID = this._problemLV1;
            problemLVAssignment.ProblemLV2ID = this._problemLV2;

            return problemLVAssignment;
        }
    }
}
